package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.WorkSpaceService;
import com.sky.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

@RestController
@RequestMapping("/admin/workspace")
@Api("工作台相关接口")
public class WorkSpaceController {
    @Autowired
    WorkSpaceService workSpaceService;
    /**
     * 工作台今日数据查询
     * */
    @GetMapping("/businessData")
    @ApiOperation("工作台今日数据查询")
    public Result<BusinessDataVO> businessData(){
        BusinessDataVO vo =  workSpaceService.businessData();
        return Result.success(vo);
    }
    /**
     * 查询订单管理
     * */
    @GetMapping("/overviewOrders")
    @ApiOperation("查询订单管理")
    public Result<OrderOverViewVO> overviewOrders(){
        OrderOverViewVO vo = workSpaceService.overviewOrders();
        return Result.success(vo);
    }
    /**
     * 查询菜品总览
     * */
    @GetMapping("/overviewDishes")
    @ApiOperation("查询菜品总览")
    public Result<DishOverViewVO> overviewDishes(){
        DishOverViewVO vo =  workSpaceService.overviewDishes();
        return Result.success(vo);
    }
    /**
     *查询套餐总览
     */
    @GetMapping("/overviewSetmeals")
    @ApiOperation("查询套餐总览")
    public Result<SetmealOverViewVO>overviewSetmeals(){
        SetmealOverViewVO vo = workSpaceService.overviewSetmeals();
        return Result.success(vo);
    }
}
